package com.dc.api.spike.service;

import com.alibaba.fastjson.JSONObject;
import com.dc.base.BaseResponse;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author: KEYD
 * @Date: 2020/1/19 21:00
 * @Desc: 秒杀服务的接口
 */
public interface ISpikeCommodityService {

    @RequestMapping("/spike")
    @Transactional
    public BaseResponse<JSONObject> spike(String phone, Long seckillId);

    /**
     * 新增对应商品库存令牌桶
     */
    @RequestMapping("/addSpikeToken")
    public BaseResponse<JSONObject> addSpikeToken(Long seckillId, Long tokenQuantity);


}
